// CommandLineHelper Library
// =========================
// License: Microsoft Permissive License (Ms-PL) v1.1
// Author: Rhy Mednick (http://www.rhyverse.net)
// Project Site: http://www.codeplex.com/CommandLineHelper
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using CommandLineHelper.Attributes;
using CommandLineHelper;

namespace CommandLineHelper.Tests
{
    [TestFixture]
    public class ParameterAttribute_Test
    {
        [Test]
        public void HelpMessageTest()
        {
            ParameterAttribute target = new ParameterAttribute();

            string val = "This is the test help message.";
            target.HelpMessage = val;
            Assert.AreEqual(val, target.HelpMessage, "CommandLineHelper.Attributes.ParameterAttribute.HelpMessage was not set correctly.");

            val = null;
            target.HelpMessage = val;
            Assert.AreEqual(val, target.HelpMessage, "CommandLineHelper.Attributes.ParameterAttribute.HelpMessage was not set correctly.");

            val = String.Empty;
            target.HelpMessage = val;
            Assert.AreEqual(val, target.HelpMessage, "CommandLineHelper.Attributes.ParameterAttribute.HelpMessage was not set correctly.");
        }

        [Test]
        public void MandatoryTest()
        {
            ParameterAttribute target = new ParameterAttribute();

            bool val = false;
            target.Mandatory = val;
            Assert.AreEqual(val, target.Mandatory, "CommandLineHelper.Attributes.ParameterAttribute.Mandatory was not set correctly.");
        }

        [Test]
        public void ValueFromRemainingArgumentsTest()
        {
            ParameterAttribute target = new ParameterAttribute();

            bool val = false;
            target.ValueFromRemainingArguments = val;
            Assert.AreEqual(val, target.ValueFromRemainingArguments, "CommandLineHelper.Attributes.ParameterAttribute.ValueFromRemainingArguments was not set correctly.");
        }

    }
}
